package com.dxf.sysadmin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dxf.sysadmin.entity.EvaluteResult;
import com.dxf.sysadmin.entity.vo.CourseClazzTeacherVo;
import com.dxf.sysadmin.entity.vo.EvaluteResultVo;
import com.dxf.sysadmin.entity.vo.ResultVo;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 评价结果 Mapper 接口
 */
public interface EvaluteResultMapper extends BaseMapper<EvaluteResult> {
    Page<EvaluteResultVo> selectEvaluteResultPage(Page<EvaluteResultVo> pagination);

    @Select("select taskId,teacherId,typeId,count(*) num,avg(score) avgScore from `evalute-result` where taskId=#{tid} and teacherId=#{uid} GROUP BY (typeId)")
    List<ResultVo> selectResultVo(Long tid,Long uid);
}
